import Storage from "./storage";

export function load (key){  //读取
    return new Promise((resolve,reject)=>{
        Storage.load({key:key}).then(res=>{
            resolve(res);
        }).catch((err)=>{
            reject(err);
        })
    })
}
export function save (key,data){  //保存
    return new Promise((resolve,reject)=>{
        Storage.save({key:key,data}).then(res=>{
            resolve(res);
        }).catch((err)=>{
            reject(err);
        })
    })
}
export function remove (key){  //删除
    Storage.remove({key:key});
}
